package cn.tedu.live8.controller;

import cn.tedu.live8.mapper.DetailsMapper;
import cn.tedu.live8.pojo.vo.DetailsVO;
import cn.tedu.live8.pojo.vo.ShoppingIndexVO;
import cn.tedu.live8.service.ShoppingIndexService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/details")
public class DetailsController {
    @Autowired
    private DetailsMapper mapper;

    //获取到所有产品信息
    @GetMapping("/select")
    public List<DetailsVO> getProductList() {
        List<DetailsVO> list = mapper.list();
        log.debug("开始执行ShoppomhIndex页面对应的Controller,并返回页面数据:{}", list);
        return list;
    }

}
